package com.cysyz.mylib.utils.myassert;

import java.util.List;


public class ListValueException extends RuntimeException {
	private List<String> values;
	private String message;
	
	public ListValueException(String message) {
		super(message);
	}
	public ListValueException(List<String> values, String prefixMsg) {
		StringBuilder message = new StringBuilder(prefixMsg);
		for (String field : values) {
			message.append(field).append(",");
		}
		message.deleteCharAt(message.length() - 1);
		this.message = message.toString();
		this.values = values;
	}

	@Override
	public String getLocalizedMessage() {
		return this.message;
	}
	/**
	 * 
	 */
	private static final long serialVersionUID = 9187533357748492578L;
	public List<String> getIsNullOrEmptyFields() {
		return values;
	}
}
